package com.dianzhihan.cashier.model.user;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * @author Dianzhi Han
 * @version 1.0
 * @description: 用户实体类
 * @date 2023/2/5 13:28
 */
@Slf4j
@Data
public class User {
    private Integer userId;    // 保留 Integer 而不是 int，是想保存 null
    private String username;
    private String password;

    // 无参构造方法是给 Mybatis 使用,不然可能有bug
    public User() {
        log.debug("model.user.User()被mybatis调用");
    }

    public User(String username, String password) {
        log.debug("model.user.User(username = {}, password = {})", username, password);
        this.username = username;
        this.password = password;
    }
}
